/*
 * @Author: your name
 * @Date: 2021-11-09 16:30:21
 * @LastEditTime: 2021-12-17 13:56:01
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \li-yuwei\egg-example\app\controller\home.js
 */
"use strict";

const Controller = require("../core/base_controller");
class OrderController extends Controller {
    //获取列表
    async getOrderList() {
            const { ctx, app } = this;
            try {
                const res = await ctx.service.order.getOrderList();
                this.success(res);
            } catch (err) {
                this.error(err.message);
            }
        }
        //搜索
    async searchOrderList() {
            const { ctx, app } = this;
            try {
                const res = await ctx.service.order.searchOrderList();
                this.success(res);
            } catch (err) {
                this.error(err.message);
            }
        }
        //删除
    async delOrderList() {
        const { ctx, app } = this;
        try {
            const res = await ctx.service.order.delOrderList();
            this.success(res);
        } catch (err) {
            this.error(err.message);
        }
    }
}

module.exports = OrderController;